﻿//Copyright 2010 http://tv4home.codeplex.com
//This file is part of TV4Home.WebInterface.UI.
//TV4Home.WebInterface.UI is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
//TV4Home.WebInterface.UI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//You should have received a copy of the GNU General Public License along with TV4Home.WebInterface.UI If not, see http://www.gnu.org/licenses/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;

namespace TV4Home.WebInterface.UI.Code
{
    public abstract class PageBase : Page
    {
        protected override void OnLoad(EventArgs e)
        {
            // get localized page title of the current content page
            string pageTitle = String.Format(Properties.Resources.CommonPageTitle, GetLocalResourceObject(@"Page_Title"));

            if (this.Master is WebSiteMaster)
                (this.Master as WebSiteMaster).PageTitle = pageTitle;
            else if (this.Master is DialogMasterPage)
                (this.Master as DialogMasterPage).PageTitle = pageTitle;

            base.OnLoad(e);
        }

        public virtual void UpdateUI()
        {
        }
    }
}
